/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.rm.entidades;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ffbeltran
 */
@Entity
@Table(name = "exp_vida")
@NamedQueries( {
		@NamedQuery(name = "ExpVida.findAll", query = "SELECT e FROM ExpVida e"),
		@NamedQuery(name = "ExpVida.findById", query = "SELECT e FROM ExpVida e WHERE e.id = :id"),
		@NamedQuery(name = "ExpVida.findByJugador", query = "SELECT e FROM ExpVida e WHERE e.jugador = :jugador"),
		@NamedQuery(name = "ExpVida.findByPvPerdidos", query = "SELECT e FROM ExpVida e WHERE e.pvPerdidos = :pvPerdidos"),
		@NamedQuery(name = "ExpVida.findByIdPartida", query = "SELECT e FROM ExpVida e WHERE e.idPartida = :idPartida"),
		@NamedQuery(name = "ExpVida.findByCompartido", query = "SELECT e FROM ExpVida e WHERE e.compartido = :compartido")})
public class ExpVida extends ExperienciaBase {
    private static final long serialVersionUID = 1L;

    @Basic(optional = false)
    @Column(name = "valor1")
    private int pvPerdidos;

    public ExpVida() {
    }

    public ExpVida(Integer id) {
        super(id);
    }

    public int getPvPerdidos() {
        return pvPerdidos;
    }

    public void setPvPerdidos(int valor1) {
        this.pvPerdidos = valor1;
    }
    
    @Override
	public void actualizaExp() {
		setExp(pvPerdidos);
	}
    
    @Override
    public String toString() {
        return "org.rm.entidades.ExpVida[id=" + super.getId() + "]";
    }
}
